#!/bin/bash

#清除七天前的备份
find /backup -mtime +7 -exec rm -rf {} \;
tar -czf /backup/$(date +%Y%m%d%H%M%S)-log.tar.gz /var/log/*
